package com.orange.framework.init;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @Author YWF
 * @Date 2023/2/1 10:30
 */
@Slf4j
@Service
public class SpringIocDisposableBean implements InitializingBean, DisposableBean {
    @Override
    public void destroy() throws Exception {
        log.info("Spring容器销毁,程序已关闭");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("完成了Bean的初始化");
    }
}
